
<style>
    @media (min-width: 768px){
        .roleList {
            margin-right: 0;
            margin-left: 0;
            background-color: #fff;
            border-color: #ddd;
            border-width: 1px;
            border-radius: 4px 4px 0 0;
            -webkit-box-shadow: none;
            box-shadow: none;
        }
    }
</style>
<div class="container">
    <div class="well-small text-danger">
        <?php
        if (isset($actionResult)) {
            echo $actionResult;
        }
        ?>
    </div>
    <h3 class="form-signin-heading text-muted"><?php echo '机构关系列表'; ?></h3>
    <div class="roleList">
        <table class="table table-striped">
            <thead>
                <tr>
                    <th>机构名</th>
                    <th>机构ID</th>
                    <th>机构关系</th>
                </tr>
            </thead>
            <tbody>
                <?php
                foreach ($spaceRelationshipView as $id => $list) {
                    $spaceName = $list->getItem('spaceName')->getValue();
                    $mySpaceId = $list->getItem('mySpaceId')->getValue();
                    $relationship = $list->getItem('relationship')->getValue();
                    ?>
                    <tr>
                        <td><?php echo $spaceName; ?></td>
                        <td><?php echo $mySpaceId; ?></td>
                        <td><?php echo $relationship; ?></td>
                        <td>
                            <?php
                            echo $control->getAjaxLink(array('name' => '删除机构关系', 'id' => BUISpaceConn::Show_Delete_Relationship), array(
                                'relationshipId' => $id,
                                'htmlOptions' => array(
                                    'class' => ''
                            )));
                            ?>&nbsp;|&nbsp;
                            <?php
                            echo $control->getAjaxLink(array('name' => '新增机构关系', 'id' => BUISpaceConn::Show_Add_Relationship), array(
                                'relationshipId' => $id,
                                'htmlOptions' => array(
                                    'class' => ''
                            )));
                            ?>
                        </td>
                    </tr>
                <?php } ?>
            </tbody>
        </table>
    </div>
    <div class="roleList">
        <?php
        echo $control->getAjaxLink(array('name' => '新增机构关系', 'id' => BUISpaceConn::Show_Add_Relationship), array('htmlOptions' => array(
                'class' => 'btn btn-success btn-lg btn-block'
        )));
        ?>
    </div>
</div>